'use strict'

const Controller = require('egg').Controller

class ManagerController extends Controller {
  async login() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.manager.login(
      ctx.request.body
    )
    ctx.body = resBody
  }

  async logout() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.manager.logout(
      ctx.request.body
    )
    ctx.body = resBody
  }

  async getInfo() {
    const { ctx } = this
    const resBody = await ctx.service.managerrecord.manager.getInfo(ctx.query)
    ctx.body = resBody
  }
}

module.exports = ManagerController
